﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <title>TrafficLight: Light.cpp Source File</title>
    <link href="/Content/Help.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/tabs.css" rel="stylesheet" type="text/css" />
    <link href="/Content/css/doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="header">
        <img id="logo" alt="StateForge" src="/Content/Images/StateForgeLogo.png" />
        <div id="title">
            <h1>
                Examples using state machines generated by StateBuilderCpp
            </h1>
            <h3>
                TrafficLight: Light.cpp Source File
            </h3>
        </div>
        <div id="menucontainer">
            <ul id="menu">
                <li><a href="/">Home</a></li>
                <li><a href="/Home/Download">Downloads</a></li>
                <li><a href="/Help/state-machine-tools.aspx">Help</a></li>
                <li><a href="/Home/Faq">F.A.Q</a></li>
                <li><a href="/Home/About">Contact us</a></li>
            </ul>
        </div>
    </div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">Light.cpp</div>  </div>
</div>
<div class="contents">
<a href="_light_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;QsLog.h&gt;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;QsLogDest.h&gt;</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;<a class="code" href="_light_8h.html">Light.h</a>&gt;</span>
<a name="l00007"></a>00007 
<a name="l00008"></a><a class="code" href="class_light.html#aeb5df09a25a32f19fdffa761268ba24f">00008</a> <a class="code" href="class_light.html#aeb5df09a25a32f19fdffa761268ba24f">Light::Light</a>() :
<a name="l00009"></a>00009   m_lRedDuration(1000),
<a name="l00010"></a>00010   m_lYellowDuration(1000),
<a name="l00011"></a>00011   m_lGreenDuration(1000),
<a name="l00012"></a>00012   m_lMaxDuration(3500)
<a name="l00013"></a>00013 {
<a name="l00014"></a>00014 }
<a name="l00015"></a>00015 
<a name="l00016"></a><a class="code" href="class_light.html#ad0e59fad13bb6cfadc25b2c477e9ddc7">00016</a> <a class="code" href="class_light.html#ad0e59fad13bb6cfadc25b2c477e9ddc7">Light::~Light</a>()
<a name="l00017"></a>00017 {
<a name="l00018"></a>00018 }
<a name="l00019"></a>00019 
<a name="l00020"></a><a class="code" href="class_light.html#ac0232ef304f8989db30c3fa4c5853863">00020</a> <span class="keywordtype">void</span> <a class="code" href="class_light.html#ac0232ef304f8989db30c3fa4c5853863">Light::TurnOnRed</a>()
<a name="l00021"></a>00021 {
<a name="l00022"></a>00022   QLOG_INFO();
<a name="l00023"></a>00023 }
<a name="l00024"></a>00024 
<a name="l00025"></a><a class="code" href="class_light.html#a80b552e6a360f0734aefbfd3dc817b32">00025</a> <span class="keywordtype">void</span> <a class="code" href="class_light.html#a80b552e6a360f0734aefbfd3dc817b32">Light::TurnOffRed</a>()
<a name="l00026"></a>00026 {
<a name="l00027"></a>00027   QLOG_INFO();
<a name="l00028"></a>00028 }
<a name="l00029"></a>00029 
<a name="l00030"></a><a class="code" href="class_light.html#a8ca3fdbd2c5b9bf8b109bacb5345ca41">00030</a> <span class="keywordtype">void</span> <a class="code" href="class_light.html#a8ca3fdbd2c5b9bf8b109bacb5345ca41">Light::TurnOnYellow</a>()
<a name="l00031"></a>00031 {
<a name="l00032"></a>00032   QLOG_INFO();
<a name="l00033"></a>00033 }
<a name="l00034"></a>00034 
<a name="l00035"></a><a class="code" href="class_light.html#a483c8d566de37761c6217a58f7753ef4">00035</a> <span class="keywordtype">void</span> <a class="code" href="class_light.html#a483c8d566de37761c6217a58f7753ef4">Light::TurnOffYellow</a>()
<a name="l00036"></a>00036 {
<a name="l00037"></a>00037   QLOG_INFO();
<a name="l00038"></a>00038 }
<a name="l00039"></a>00039 
<a name="l00040"></a><a class="code" href="class_light.html#af35b9286a07f998cd8af09e2533a7aaf">00040</a> <span class="keywordtype">void</span> <a class="code" href="class_light.html#af35b9286a07f998cd8af09e2533a7aaf">Light::TurnOnGreen</a>()
<a name="l00041"></a>00041 {
<a name="l00042"></a>00042   QLOG_INFO();
<a name="l00043"></a>00043 }
<a name="l00044"></a>00044 
<a name="l00045"></a><a class="code" href="class_light.html#a81f0d0ea11d88de3bacf8fd963989e70">00045</a> <span class="keywordtype">void</span> <a class="code" href="class_light.html#a81f0d0ea11d88de3bacf8fd963989e70">Light::TurnOffGreen</a>()
<a name="l00046"></a>00046 {
<a name="l00047"></a>00047   QLOG_INFO();
<a name="l00048"></a>00048 }
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="preprocessor">#include &quot;Light.moc&quot;</span>
</pre></div></div>
</div>
﻿<div id="footer">
    <hr />
    <p>
        Copyright &copy; 2011 StateForge.</p>
    <hr />
</div>
</body> </html> 
